package com.mbc.rmt.manager;

import java.sql.Connection;
import java.util.Date;

import com.mbc.common.manager.AbstractMgr;
import com.mbc.rmt.dao.RemittanceDAOFactory;
import com.mbc.rmt.dao.RemittanceSerialDAO;

public class RemittanceSerialMgr extends AbstractMgr {

	public static final String CASH_REMITTANCE_BY_AGENT = "BA";
	public static final String CASH_RECEIVED_BY_INDIVIDUAL_TO_PAY_AGENT = "IA";
	public static final String CASH_REMITTANCE_TO_AGENT = "TA";
	public static final String CASH_PAID_TO_INDIVIDUAL = "PI";
	public static final String DEFINE_PAYMENT_TYPE = "DP";
	public static final String DEFINE_PAYMENT_DETAILS_BY_AGENT_N_BANK = "DD";
	public static final String CASH_PAYMENT_BY_AGENT_N_BANK = "PA";
	public static final String CASH_PAYMENT_BY_OFFICE = "PO";
	public static final String CASH_PAYMENT_BY_WAITING = "PW";
	public static final String CASH_PAYMENT_BY_SENT = "PS";
	public static final String CASH_RETURN_BY_AGENT_N_BANK = "RA";
	public static final String CASH_RETRUN_BY_OFFICE = "RO";
	public static final String CASH_RETURN_BY_WAITING = "RW";
	public static final String CASH_RETURN_BY_SENT = "RS";
	public static final String CASH_PAYMENT_BY_RETURN = "PR";
	public static final String CASH_RECEIVED_FROM_AGENT = "CR";
	public static final String CASH_PAID_TO_AGENT = "CP";
	public static final String CASH_RECEIVED_FROM_BRANCH = "RB";
	public static final String CASH_PAID_TO_BRANCH = "PB";
	public static final String SAVING = "SV";
	public static final String SAVING_RETURN = "SR";
	
	public static String getFormattedSerial(String code, Date trDate, long branchId, Connection conn)throws Exception{
		RemittanceSerialDAO l_rmtSerialDAO = RemittanceDAOFactory.getRemittanceSerialDAO(conn);
		return l_rmtSerialDAO.getVoucherNo(branchId, trDate, code);
	}
	
}
